﻿using VM.Common.Enums;
using VM.Common.Helper;

namespace VM.Start.Models
{
    /// <summary>
    /// 模块信息
    /// </summary>
    [Serializable]
    public class ModuleParam : NotifyPropertyBase
    {
        /// <summary>
        /// 模块名
        /// </summary>
        public string ModuleName { get; set; } = "";
        /// <summary>
        /// 模块编号
        /// </summary>
        public int ModuleNo { get; set; }
        /// <summary>
        /// 流程ID
        /// </summary>
        public int ProjectID { get; set; } = -1;
        /// <summary>
        /// 插件名称  每一个插件都是唯一	
        /// </summary>
        public string PluginName { get; set; } = "";
        /// <summary>
        /// 模块状态
        /// </summary>
        private eRunStatus _Statue = eRunStatus.NotRun;
        public eRunStatus Status
        {
            get { return _Statue; }
            set { Set(ref _Statue, value); }
        }
        /// <summary>
        /// 模块运行时间
        /// </summary>
        private double _ElapsedTime;
        public double ElapsedTime
        {
            get { return _ElapsedTime; }
            set { Set(ref _ElapsedTime, value); }
        }
        /// <summary>
        /// 模块编号 
        /// </summary>
        public int ModuleEncode { get; set; } = 1;
        /// <summary>
        /// 第一次运行标志
        /// </summary>
        [NonSerialized]
        public bool FirstRunFlag = false;
        /// <summary>
        /// 启用超级工具
        /// </summary>
        public bool IsUseSuperTool { get; set; } = true;
        /// <summary>
        /// 模块注释
        /// </summary>
        private string _Remarks;
        public string Remarks
        {
            get { return _Remarks; }
            set { Set(ref _Remarks, value); }
        }
        /// <summary>
        /// 使能断点
        /// </summary>
        public bool IsEnableBreakPoint { get; set; } = false;
        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsUse { get; set; } = true;
    }
}
